const hope = require("hope");

const { Mongoose, initMongoose } = require("./lib/init");

hope.registerSrv(
	"hopeMongoose",
	{
		host: process.env.HOPE_MONGO_HOST || "127.0.0.1",
		port: process.env.HOPE_MONGO_PORT || 27017,
		database: process.env.HOPE_MONGO_DB || "test",
		version: "v1"
	},
	function () {
		this.__init = function (opts) {
			initMongoose.call(this, opts);
		};
		this.Id = Mongoose.Types.ObjectId;
	}
);
